import request from "../utils/request";

export function selectWriters(data) {
return request({
url: '/writer/selectWriters',
data: data,
method: 'POST'
});
}


export function selectAll(data) {
return request({
url: '/${classInfo.className?uncap_first}/selectAll',
data: data,
method: 'POST'
});
}

export function selectPage(data,pageNumber,pageSize) {
return request({
url: `/${classInfo.className?uncap_first}/selectPage?pageNumber=${r'${pageNumber}'}&pageSize=${r'${pageSize}'}`,
data: data,
method: 'POST'
});
}


export function selectVerifyWriters(data) {
return request({
url: '/writer/selectVerifyWriters',
data: data,
method: 'POST'
})
}

export function createWriter(data) {
return request({
url: '/writer',
data: data,
method: 'POST'
})
}
export function create(data) {
return request({
url: '/${classInfo.className?uncap_first}',
data: data,
method: 'POST'
})
}


export function updateWriter(data) {
return request({
url: '/writer',
data: data,
method: 'PUT'
})
}

export function update(data) {
return request({
url: '/${classInfo.className?uncap_first}',
data: data,
method: 'PUT'
})
}


export function uploadPhoto(wid, data) {
return request({
url: '/writer/upload/' + wid,
data: data,
method: 'POST'
})
}


// export function uploadExcel(wid, excelData) {
//   return request({
//     url: '/writer/uploadExcel/' + wid,
//     data: excelData,
//     method: 'POST'
//   })
// }


// export function uploadExcel(excelData) {
//   return request({
//     url: '/writer/uploadExcel' ,
//     data: excelData,
//     method: 'POST'
//   })
// }

export function uploadExcelOfBodyComposition(excelData) {
return request({
url: '/bodyComposition/uploadExcel' ,
data: excelData,
method: 'POST'
})
}
// BodyCompositionService

export function deleteWriter(wid) {
return request({
url: '/writer/' + wid,
method: 'DELETE'
})
}

export function deleteOne(wid) {
return request({
url: '/${classInfo.className?uncap_first}/' + wid,
method: 'DELETE'
})
}

export function getWriterInfo(wid) {
return request({
url: '/writer/' + wid,
method: 'GET'
})
}

export function getInfo(wid) {
return request({
url: '/${classInfo.className?uncap_first}/' + wid,
method: 'GET'
})
}

export function batchInsertWriters(data) {
return request({
url: '/writer/batchInsert',
data: data,
method: 'POST'
})
}


export function batchInsert(data) {
return request({
url: '/${classInfo.className?uncap_first}/batchInsert',
data: data,
method: 'POST'
})
}

export function batchDelete(data) {
return request({
url: '/${classInfo.className?uncap_first}/batchDelete',
data: data,
method: 'POST'
})
}

export function verifyWriter(data) {
return request({
url: '/writer/verify',
method: 'POST',
data: data
})
}

export function exportToWord(wid) {
return request({
url: '/writer/exportToWord/' + wid,
method: 'GET',
responseType: 'blob'
})
}
